package com.zxc.dao;

import com.zxc.model.Equipment.Equipment;
import com.zxc.model.Equipment.EquipmentApply;
import com.zxc.model.Pesticide;

import java.util.List;

public interface EquipmentDao {



/*   这里参考
*           https://blog.csdn.net/edison_03/article/details/77163792
*    如果不这样弄 会报错
*    mybatis动态表名遇见There is no getter for property named 'tableName' in 'class java.lang.String'
*
*    原因:Mybatis默认采用ONGL解析参数，所以会自动采用对象树的形式取string.tableName值，引起报错。
*
* */
    public List<Equipment> selectEquipmentByParkId(String id);

    public List<Equipment> selectEquipmentByAccount(Equipment Equipment);
    public List<Equipment> selectEquipmentByUserAccount(Equipment Equipment);
//    查询报修的订单查询
    public List<EquipmentApply>selectEquipmentState(EquipmentApply equipmentApply);
    int updateTrading(Equipment vo);
//    设备审批更新语句
    int updateEquipmentApply(EquipmentApply vo);
//      设备审批插入语句
    int insertEquipmentApply(EquipmentApply equipmentApply);
    int deleteEquipment(Equipment equipment);


    //通过account的值来区分管理员与普通用户并查询
    //管理员查询设备仓库信息
    List<Equipment> getEquipmentWarehouseRoot(Equipment Equipment);
    //普通用户查询仓库设备信息
    List<Equipment> getEquipmentWarehouseUser(Equipment Equipment);
    //更新总仓库
    int updateEquipmentWarehouse(Equipment equipment);

    //设备审批相关
    List<Equipment> selectEquipmentWarehouseByEquipment(Equipment equipment);
    int insertUserEquipmentWarehouse(Equipment equipment);
    List<Equipment> selectUserEquipmentWarehouseByUserId(Equipment equipment);
    int updateUserEquipmentWarehouse(Equipment equipment);

}
